package com.chongdong.work.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.chongdong.annotation.CDService;
import com.chongdong.work.pojo.User;
import com.chongdong.work.service.CDUserService;

@CDService("cDUserService")
public class CDUserServiceImpl implements CDUserService {

	public List<User> getUserList() {
		List<User> userList = new ArrayList<User>();
		for(Long i = 0L; i<5; i++) {
			User user = new User();
			user.setId(i);
			user.setName("name"+i);
			user.setAge(i.intValue()+20);
		}
		return userList;
	}

	public User getUserByUserId(Long userId) {
		User user = new User();
		user.setId(userId);
		user.setName("name"+userId);
		user.setAge(userId.intValue()+20); 
		return user;
	}
	
}
